home *** CD-ROM | disk | FTP | other *** search
- PAGE 62,132
- Title DoubleDOS Utility: Current Partition Status
-
- CR EQU 0Dh ;ASCII Carriage Return
- LF EQU 0Ah ;ASCII Line Feed
- $ EQU 24h ;String termination charachter
-
- Dos_Call EQU 21h
- Terminate_Process EQU 4Ch
- Put_String EQU 09h
- DD_Status EQU 0E4h
-
- Code_Seg SEGMENT
- ASSUME cs:Code_Seg,ds:Code_Seg,es:Code_Seg
- ORG 0100h
- Main PROC NEAR
-
- mov ah,Put_String ;Display program info
- mov dx,OFFSET Prog_Info
- int Dos_Call
-
- mov ah,DD_Status ;Get DoubleDOS status of
- int Dos_Call ; the current partition
- mov Stat_Byte,al
- mov Task_Byte,ah
-
- or al,00110000b ;convert binary integer
- mov Stat_Var,al ; to ASCII and output
- mov ah,Put_String
- mov dx,OFFSET Stat_Prn ;Output Status
- int Dos_Call
-
- mov al,Stat_Byte
- cmp al,00h ;If DoubleDOS is not
- jz Skip_Task ; running, skip task#
-
- mov al,Task_Byte ;Convert binary integer
- or al,00110000b ; to ASCII and output
- mov Task_Var,al
- mov ah,Put_String
- mov dx,OFFSET Task_Prn ;Output Task Number
- int Dos_Call
-
- Skip_Task: mov ah,Put_String ;Errorlevel Message
- mov dx,OFFSET Finished
- int Dos_Call
-
- mov al,Stat_Byte ;Errorlevel returned
- mov ah,Terminate_Process ; in AL
- int Dos_Call
-
- Stat_Byte DB ?
- Task_Byte DB ?
-
- Prog_Info DB CR,LF,'DoubleDOS Utility - by Chris M. Magyar'
- DB ' - 12/13/85',CR,LF,CR,LF
- DB 'Status : 0 - DoubleDOS not running.',CR,LF
- DB ' 1 - Program is Visible.',CR,LF
- DB ' 2 - Program is Invisible.',CR,LF,CR,LF,$
-
- Stat_Prn DB 'Current Partition Status : '
- Stat_Var DB ?,CR,LF,$
-
-
- Task_Prn DB 'Current Task Number : '
- Task_Var DB ?,CR,LF,$
-
- Finished DB CR,LF,'Status is returned via ERRORLEVEL.',CR,LF,$
-
- Main ENDP
- Code_Seg ENDS
- END Main
-
-